 % Creates a class named neuron, placed in file 'neuron.m'
 % Neuron properties:
 %    numberInLayer - neuron's order number in layer
 %    layer - number of layer that contains this neuron
 %  pair (numberInLayer, layer) allows to identify the neuron in the
 %  connectome)
 %    threshold - minimal value of sum of weighted inputs that causes
 %    producing spike by neuron
 % 
classdef neuron
    properties
        numberInLayer;
        layer;
        threshold;
    end
    methods
        % constructor of the neuron
        function obj = neuron(numberInLayer, layer, threshold)
            obj.numberInLayer = numberInLayer;
            obj.layer = layer;
            obj.threshold = threshold;
        end
        % display function for neuron objects
        function disp(obj)
            s = sprintf('Neuron #%d (layer: %d threshold: %.2f)', ...
                obj.numberInLayer, obj.layer, obj.threshold);
            disp(s);
        end
    end
end